package cn.xzzz2020.XJynWeb.mvc.type;


import java.lang.reflect.Method;
import java.util.Map;

/**
 * 封装待执行的Controller及其方法实例和参数的映射
 * @author xzzz2020
 * @version 1.0
 * @date 2020/9/5 16:40
 */

public class ControllerMethod {
    //Controller对应的Class对象
    private Class<?> controllerClass;
    //执行的Controller方法实例
    private Method invokeMethod;
    //方法参数名称以及对应的参数类型
    private Map<String,Class<?>> methodParameters;

    public ControllerMethod(Class<?> controllerClass, Method invokeMethod, Map<String, Class<?>> methodParameters) {
        this.controllerClass = controllerClass;
        this.invokeMethod = invokeMethod;
        this.methodParameters = methodParameters;
    }

    public ControllerMethod() {
    }

    public Class<?> getControllerClass() {
        return controllerClass;
    }

    public void setControllerClass(Class<?> controllerClass) {
        this.controllerClass = controllerClass;
    }

    public Method getInvokeMethod() {
        return invokeMethod;
    }

    public void setInvokeMethod(Method invokeMethod) {
        this.invokeMethod = invokeMethod;
    }

    public Map<String, Class<?>> getMethodParameters() {
        return methodParameters;
    }

    public void setMethodParameters(Map<String, Class<?>> methodParameters) {
        this.methodParameters = methodParameters;
    }
}
